/*
 * @Author: your name
 * @Date: 2020-10-26 22:31:02
 * @LastEditTime: 2020-10-28 23:39:25
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \就业班练习d:\桌面\ma-pc\src\api\article.js
 */
import axios from '@/utils/request'

// 1.查询文章
// params参数代表查询字符串对象
export const getArticle = (params) => {
  return axios({
    method: 'GET',
    url: '/mp/v1_0/articles',
    params
  })
}

/**
 * @description: 获取文章频道接口
 * @return {Promise}
 */
export const getArticleChannels = () => {
  return axios({
    method: 'GET',
    url: '/mp/v1_0/channels'
  })
}

/**
 * @description:删除文章
 * @param {Neamber} id
 * @return {Promise}
 */
export const delArticle = (id) => {
  return axios({
    method: 'DELETE',
    url: '/mp/v1_0/articles/' + id
  })
}
